package com.ywgt.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ywgt.pojo.Coupon;
import com.ywgt.pojo.CouponUser;
import com.ywgt.mapper.CouponUserMapper;
import com.ywgt.service.CouponUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * <p>
 * 优惠券用户使用表 服务实现类
 * </p>
 *
 * @author yiping
 * @since 2021-03-13
 */
@Service
public class CouponUserServiceImpl extends ServiceImpl<CouponUserMapper, CouponUser> implements CouponUserService {



    @Override
    public Page<CouponUser> getCouponUsees(Integer userId, Integer couponId, Integer status, int page, int limit, String sort, String order) {
        PageHelper.startPage(page,limit);
        return baseMapper.selectCouponUsers(userId,couponId,status,sort,order);
    }


}
